package com.yike.order.controller;

import com.lkl.laop.sdk.LKLSDK;
import com.lkl.laop.sdk.request.V3CcssCounterOrderCloseRequest;
import com.yike.common.api.Add;
import com.yike.common.api.ApiResult;
import com.yike.common.base.BaseController;
import com.yike.common.enums.OperationLogType;
import com.yike.common.log.OperationLog;
import com.yike.common.pagination.Paging;
import com.yike.order.lkl.demo.BaseCommonDemo;
import com.yike.order.param.*;
import com.yike.order.service.OrderService;
import com.yike.order.vo.OrderListVo;
import com.yike.order.vo.OrderVo;
import com.yike.order.vo.RefundInfoVo;
import com.yike.order.vo.RefundVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * lkl测试 控制器
 *
 * @author yike
 * @since 2025-05-29
 */
@Slf4j
@RestController
@RequestMapping("/lkl")
@Api(value = "lkl测试", tags = {"lkl测试"})
public class LKLDemoController extends BaseController {


    /**
     * 添加订单表
     */
    @PostMapping("/ceshi")
    @ApiOperation(value = "ceshi", response = ApiResult.class)
    public ApiResult ceshi() throws Exception {
        BaseCommonDemo.doInit();

        //2. 装配数据
        V3CcssCounterOrderCloseRequest req = new V3CcssCounterOrderCloseRequest();
        req.setOutOrderNo("KFPT2022071415575938951152");
        req.setMerchantNo("8222900701105HK");
        req.setChannelId("2021052614391");

        //3. 发送请求
        String response = LKLSDK.httpPost(req);

        //4. 响应
        System.out.println(response);

        return ApiResult.ok();
    }

    @PostMapping("/ceshi1")
    @ApiOperation(value = "ceshi1", response = ApiResult.class)
    public ApiResult ceshi1() throws Exception {

        //2. 装配数据
        V3CcssCounterOrderCloseRequest req = new V3CcssCounterOrderCloseRequest();
        req.setOutOrderNo("KFPT2022071415575938951152");
        req.setMerchantNo("8222900701105HK");
        req.setChannelId("2021052614391");

        //3. 发送请求
        String response = LKLSDK.httpPost(req);

        //4. 响应
        System.out.println(response);

        return ApiResult.ok();
    }

}

